import React, {useState} from 'react';
import {StyleSheet, Text, TextInput, View} from 'react-native';
import {setSpText, scaleSizeH, scaleSizeW} from '../utils/ScreenUtil';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';

import Hot from './Hot'
import Soon from './Soon'
const Tab = createMaterialTopTabNavigator();

export default ({navigation}) => {
  return (
    <View style={{flex:1}}>
      <View
        style={{
          flexDirection: 'row',
          alignItems: 'center',
          justifyContent: 'space-between',
        }}>
        <Text>成都</Text>
        <TextInput
          placeholder="搜索"
          style={{
            padding: 0,
            width: scaleSizeW(500),
            height: scaleSizeH(50),
            borderColor: '#bdbdbd',
            borderWidth: 1,
            textAlign: 'center',
          }}></TextInput>
      </View>
      <View style={{flex:1}}>

            <Tab.Navigator  screenOptions={{
                tabBarLabelStyle: { fontSize: 12 },
                tabBarStyle:{
                    // height:scaleSizeH(50),
                    elevation:0
                },
                tabBarActiveTintColor:"black",
                tabBarIndicatorStyle:{
                    backgroundColor:'black'
                },
                tabBarItemStyle:{
                },
                tabBarLabelStyle:{
                    // position:'relative',
                    // bottom:scaleSizeH(20)
                }
            }}>
                <Tab.Screen name="Hot" component={Hot} />
                <Tab.Screen name="Soon" component={Soon} />
            </Tab.Navigator>
      </View>
    </View>
  );
};
